home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / yamp16.zip / XYP.CPP < prev    next >
C/C++ Source or Header  |  1993-01-11  |  1KB  |  72 lines

  1.  
  2. /*
  3. YAMP - Yet Another Matrix Program
  4. Version: 1.6
  5. Author: Mark Von Tress, Ph.D.
  6. Date: 01/11/93  
  7.  
  8. Copyright(c) Mark Von Tress 1993
  9. Portions of this code are (c) 1991 by Allen I. Holub and are used by
  10. permission
  11.  
  12. DISCLAIMER: THIS PROGRAM IS PROVIDED AS IS, WITHOUT ANY
  13. WARRANTY, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  14. TO FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR DISCLAIMS
  15. ALL LIABILITY FOR DIRECT OR CONSEQUENTIAL DAMAGES RESULTING
  16. FROM USE OF THIS PROGRAM.
  17.  
  18. */
  19.  
  20.  
  21. #include "virt.h"
  22.  
  23. MStack *Dispatch = new MStack;
  24.  
  25.  
  26. int main()
  27. {
  28.     
  29.     VMatrix g;
  30.     int n = 100;
  31.     g = Fill(n, 2, 1);
  32.     for (int i = 1; i <= n; i++) {
  33.         g.M(i, 1) = ((double) i);
  34.         g.M(i, 2) = 1.0e-8*((double) random(i + 1));
  35.     }
  36.     
  37.     g.Nameit("graph matrix");
  38.     GMatrix Agraph(g);
  39.     Agraph.title = "Test title 1";
  40.     Agraph.title2 = "test title 2";
  41.     Agraph.xname = "x axis";
  42.     Agraph.yname = "y axis";
  43.     Agraph.RectangleOn = FFALSE;
  44.     Agraph.Href(36.0);
  45.     Agraph.Vref(60.0);
  46.     Agraph.Show();
  47.     for (i = 1; i <= n; i++) {
  48.         g.M(i, 2) = 0.5*g.m(i, 2);
  49.     }
  50.     Agraph.AddVec(g, '+');
  51.     Agraph.RectangleOn = TTRUE;
  52.     Agraph.YGridOn = TTRUE;
  53.     Agraph.XGridOn = TTRUE;
  54.     Agraph.ClearHref();
  55.     Agraph.ClearVref();
  56.     Agraph.Show();
  57.     closegraph();     /* Return the system to text mode    */
  58.     vclose();
  59.     return (0);
  60. }
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. //////////////////////////////////////////////////
  72.